package com.geely.topic;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 占助
 * @date 2020/7/13 9:57woman
 * @description ${直连型信息接收监听类} 通配符模式
 * @Copyright © 吉利汽车
 * @Version: 1.0
 */
@Component
 //监听的队列名称 topic.man  通配符模式
public class TopicManReceiver {

//    @RabbitHandler
    @RabbitListener(queues = "topic.man")
    public void process(Message testMessage) {
        System.out.println("TopicManReceiver消费者收到消息  : " + new String(testMessage.getBody()));
    }
}

